#chatBox {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    position: relative;
}

.message-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.message-actions i {
    cursor: pointer;
    color: #6c757d;
    font-size: 1em;
    transition: all 0.2s ease;
}

.message-actions i:hover {
    color: #0d6efd;
    transform: scale(1.1);
}

.message-actions i.bi-hand-thumbs-up,
.message-actions i.bi-hand-thumbs-down {
    transition: all 0.2s ease;
}

.message-actions i.bi-hand-thumbs-up.liked {
    color: #198754;
    transform: scale(1.2);
}

.message-actions i.bi-hand-thumbs-down.disliked {
    color: #dc3545;
    transform: scale(1.2);
}

.user-message {
    background-color: #007bff;
    color: white;
    margin-left: 20%;
}

.user-message .message-actions i {
    color: rgba(255, 255, 255, 0.8);
}

.user-message .message-actions i:hover {
    color: #ffffff;
}

.ai-message {
    background-color: #f8f9fa;
    margin-right: 20%;
}

.thinking {
    color: #6c757d;
    font-style: italic;
}

.thinking-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #007bff;
    margin-left: 2px;
    animation: blink 1s infinite;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    font-size: 0.8em;
}

.btn-retry {
    padding: 4px 8px;
    color: #6c757d;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-retry:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    transform: rotate(180deg);
    cursor: pointer;
}

.btn-retry i {
    font-size: 1.2em;
}

.error-message {
    color: #dc3545;
    margin-top: 5px;
    font-size: 0.9em;
}

.expanded-message {
    max-height: none !important;
    overflow: visible !important;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.toast {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    min-width: 200px;
}

.toast-header {
    background-color: transparent;
    border-bottom: none;
    color: #dc3545;
    padding: 0.5rem 1rem;
}

.toast-body {
    color: #6c757d;
    padding: 0.5rem 1rem;
    text-align: center;
}